<?php 
namespace Admin\Controller;
use Think\Controller;
/**
* 权限检查
*/
class BaseController extends Controller
{
	
	  function _initialize(){
		$this -> checkstate();
	 }
	 private function checkstate()
      {
        if (!session('?aname')) {
            $this->error('无权限访问此页', U('Admin/index/index'));
        }
    }
}